<template>
  <div class="page_root" :key="queryUpdateFlag" data-page-name="项目周报审批详情页" data-page-identification="h_v9y8nkn9zo">
    <a-spin :spinning="pageLoading.loading" :tip="pageLoading.tip">
      <!-- begin vid_fhnht6xntw 编辑验收标准 -->
      <a-modal
        class="vid_fhnht6xntw"
        v-model:visible="vid_fhnht6xntw_props.visible"
        :centered="true"
        :title="'编辑验收标准'"
        :maskClosable="false"
        @cancel="handle_vid_fhnht6xntw_cancel"
        @ok="handle_vid_fhnht6xntw_ok"
      >
        <!-- begin vid_1441w57u2x 表单容器_y36obwbjm6 -->
        <a-form ref="vid_1441w57u2x_ref" class="vid_1441w57u2x" :model="n_0i786minqv" :formModel="vid_1441w57u2x_props.formModel">
          <!-- begin vid_fmaxjf3b6f 表单项容器_fv424kbub1 -->
          <a-form-item name="r_7zj17ec6x0" :rules="n_0i786minqv_rules[`r_7zj17ec6x0`]" class="vid_fmaxjf3b6f" :label-col='{"span":4}' :wrapper-col='{"span":20}'>
            <!-- begin vid_lhd3lidih6 文本域_zk0j4y64w6 -->
            <a-textarea class="vid_lhd3lidih6" v-model:value="n_0i786minqv.r_7zj17ec6x0" :showCount="true" :maxlength="1000" :placeholder="'请输入验收标准'"> </a-textarea>
            <!-- end vid_lhd3lidih6 文本域_zk0j4y64w6 -->
            <template #label>
              <!-- begin vid_1ohu6c57n3 验收标准 -->
              <span class="vid_1ohu6c57n3"> 验收标准 </span>
              <!-- end vid_1ohu6c57n3 验收标准 -->
            </template>
          </a-form-item>
          <!-- end vid_fmaxjf3b6f 表单项容器_fv424kbub1 -->
        </a-form>
        <!-- end vid_1441w57u2x 表单容器_y36obwbjm6 -->
      </a-modal>
      <!-- end vid_fhnht6xntw 编辑验收标准 -->
      <!-- begin vid_jkc48q5g9z 容器_jiludcjfx3 -->
      <al-box class="vid_jkc48q5g9z">
        <!-- begin vid_0ek8pq8tky 容器_g57hvcfs7q -->
        <al-box class="vid_0ek8pq8tky">
          <!-- begin vid_ph9ukhlvw3 项目周报审批详情页 -->
          <span class="vid_ph9ukhlvw3"> 项目周报审批详情页 </span>
          <!-- end vid_ph9ukhlvw3 项目周报审批详情页 -->
        </al-box>
        <!-- end vid_0ek8pq8tky 容器_g57hvcfs7q -->
        <!-- begin vid_78u6bs9jm9 布局容器_akigdq5qlh -->
        <a-row class="vid_78u6bs9jm9" :gutter="16" :slots="'6:6:6:6'">
          <a-col :span="6">
            <!-- begin vid_nf78sccmv5 项目名称： -->
            <span class="vid_nf78sccmv5"> 项目名称： </span>
            <!-- end vid_nf78sccmv5 项目名称： -->
            <!-- begin vid_buqb1x2cj3 文本 -->
            <span class="vid_buqb1x2cj3">
              {{ renderStringInTemplate(vid_buqb1x2cj3_props.rt_text) }}
            </span>
            <!-- end vid_buqb1x2cj3 文本 -->
          </a-col>
          <a-col :span="6">
            <!-- begin vid_k9th1ntc8p 最近修改时间： -->
            <span class="vid_k9th1ntc8p"> 最近修改时间： </span>
            <!-- end vid_k9th1ntc8p 最近修改时间： -->
            <!-- begin vid_hburz7x4mw 文本 -->
            <span class="vid_hburz7x4mw">
              {{ renderStringInTemplate(vid_hburz7x4mw_props.rt_text) }}
            </span>
            <!-- end vid_hburz7x4mw 文本 -->
          </a-col>
          <a-col :span="6">
            <!-- begin vid_iebzu52ilc 项目负责人/技术负责人： -->
            <span class="vid_iebzu52ilc"> 项目负责人/技术负责人： </span>
            <!-- end vid_iebzu52ilc 项目负责人/技术负责人： -->
            <!-- begin vid_21wyecem44 文本 -->
            <span class="vid_21wyecem44">
              {{ renderStringInTemplate(vid_21wyecem44_props.rt_text) }}
            </span>
            <!-- end vid_21wyecem44 文本 -->
          </a-col>
          <a-col :span="6">
            <!-- begin vid_lhcwd210yb 项目经理/产品经理： -->
            <span class="vid_lhcwd210yb"> 项目经理/产品经理： </span>
            <!-- end vid_lhcwd210yb 项目经理/产品经理： -->
            <!-- begin vid_2m8qud82rb 文本 -->
            <span class="vid_2m8qud82rb">
              {{ renderStringInTemplate(vid_2m8qud82rb_props.rt_text) }}
            </span>
            <!-- end vid_2m8qud82rb 文本 -->
          </a-col>
        </a-row>
        <!-- end vid_78u6bs9jm9 布局容器_akigdq5qlh -->
        <!-- begin vid_i5vxvtjxug 布局容器_dydrpron3a -->
        <a-row class="vid_i5vxvtjxug" :slots="'24'">
          <a-col :span="24">
            <!-- begin vid_k5c28f38xn 本月总目标： -->
            <span class="vid_k5c28f38xn"> 本月总目标： </span>
            <!-- end vid_k5c28f38xn 本月总目标： -->
            <!-- begin vid_8uq0n48ysf 容器_z3qgbvim72 -->
            <al-box class="vid_8uq0n48ysf">
              <!-- begin vid_ikbn1te5r0 文本 -->
              <span class="vid_ikbn1te5r0">
                {{ renderStringInTemplate(vid_ikbn1te5r0_props.rt_text) }}
              </span>
              <!-- end vid_ikbn1te5r0 文本 -->
            </al-box>
            <!-- end vid_8uq0n48ysf 容器_z3qgbvim72 -->
          </a-col>
        </a-row>
        <!-- end vid_i5vxvtjxug 布局容器_dydrpron3a -->
        <!-- begin vid_exmd1m8sce 布局容器_2nv1mvzqff -->
        <a-row class="vid_exmd1m8sce" :slots="'24'">
          <a-col :span="24">
            <!-- begin vid_ayavr70bfj 本周进展简述： -->
            <span class="vid_ayavr70bfj"> 本周进展简述： </span>
            <!-- end vid_ayavr70bfj 本周进展简述： -->
            <!-- begin vid_fn0v81kcuk 容器_wieu7fymsj -->
            <al-box class="vid_fn0v81kcuk">
              <!-- begin vid_zb6381vnxv 简单文本_tq9v708v0o -->
              <span class="vid_zb6381vnxv">
                {{ renderStringInTemplate(vid_zb6381vnxv_props.rt_text) }}
              </span>
              <!-- end vid_zb6381vnxv 简单文本_tq9v708v0o -->
            </al-box>
            <!-- end vid_fn0v81kcuk 容器_wieu7fymsj -->
          </a-col>
        </a-row>
        <!-- end vid_exmd1m8sce 布局容器_2nv1mvzqff -->
      </al-box>
      <!-- end vid_jkc48q5g9z 容器_jiludcjfx3 -->
    </a-spin>
  </div>
</template>
<script setup lang="tsx">
  import {
      h, ref, reactive, toRaw, markRaw, watch, computed,
      onBeforeMount, onMounted, onBeforeUnmount, onUnmounted, onActivated, onDeactivated
    } from "vue";
    import { useRoute, useRouter } from 'vue-router';
    const router = useRouter();
    const route = useRoute();
    import { get, post, put, del, request, requestWithHeaders } from '@/utils/http/Axios';
    import { cloneDeep, localGet, merge, getDifferenceArray, traversalTreeStructure, checkCaseCondition, renderStringInTemplate, handleBreadcrumbJump, throttle, permission, getComponentParamsValue } from '@/utils/index';
    import { isNullOrEmpty, isEmptyArr, isNullOrUnDef, isContained, isArray, isEmpty, isObject } from '@/utils/is';
    import dayjs from 'dayjs';
    import { getPagePcChartsDataSourceConvert } from '@/utils/chart';
    import { message, notification, Modal } from 'ant-design-vue'
    import { propertyFormatByNumber, propertyFormatByPercentage, propertyFormatByDate, parseSubFromDataList } from '@/utils/format';
    import colorTheme from '@/design/custom-theme.json';
    
    import UserTableRecords from '@/model/UserTableRecords';
    import { getAppBaseUrl } from '@/utils/index';
    import { sendToken } from "@/hooks/useIframeToken";
    import { useSystemStore } from "@/store/modules/system";
    const systemStore = useSystemStore();
    



      // 获取传入的流程ID和组件参数
      const props = defineProps({
            'processInstanceId': {
            type: [String,Number,Boolean],
            default: undefined,
        },
      })
      const immediateWatch = (source, callback) => {
        watch(source, callback, {deep: true,immediate: true })
      }



  /* -------------------------- 属性定义 -------------------------- */

      const setTimeOutList = [];
      const pageLoading = reactive({
        loading: false,
        tip: undefined
      });
      const authInfo = localGet('app-user-store');

    const vid_fhnht6xntw_props = reactive({
          visible: false,
      confirmLoading: undefined,
  })

    const vid_1441w57u2x_props = reactive({
          formModel: {"r_7zj17ec6x0":""},
  })

    const vid_lhd3lidih6_props = reactive({
          value: null,
  })

    const vid_buqb1x2cj3_props = reactive({
          rt_text: undefined,
  })

    const vid_hburz7x4mw_props = reactive({
          rt_text: undefined,
  })

    const vid_21wyecem44_props = reactive({
          rt_text: undefined,
  })

    const vid_2m8qud82rb_props = reactive({
          rt_text: undefined,
  })

    const vid_ikbn1te5r0_props = reactive({
          rt_text: undefined,
  })

    const vid_zb6381vnxv_props = reactive({
          rt_text: undefined,
  })
  // ---------------------------- 定义模型数据 ----------------------------

    const n_0i786minqv = reactive({"r_7zj17ec6x0":null})

    // ============================ 定义模型数据 ============================


    const n_0i786minqv_rules = reactive({

    })


      // 处理校验
      const setSubFormName =(parentInfo, name)=>{
        return [parentInfo.parents, parentInfo.cycleIndex, name];
      }


  /* ========================== 属性定义 ========================== */


  /* -------------------------- 元素数据引用 -------------------------- */
  // 组件 表单容器_y36obwbjm6 ref 的引用
  const vid_1441w57u2x_ref = ref(null);

  /* ========================== 元素数据引用 ========================== */


  /* -------------------------- 页面数据 -------------------------- */

    // 页面数据 本周工作进展审批详情
    const dataConnector_conn_5zvrzc2qr1_response = ref();
    const dataConnector_conn_5zvrzc2qr1 = async (additionParams = {}) => {
        const exec = async () => {
          // 获取参数
          const params = {

          };

          // 注入附加的参数
          try {
            merge(params, additionParams);
          } catch (error) {
            console.log(error)
          }

          // 判断加载提示

          // 处理URL
          let url = '/solution-ppm/api/v2/built-in-system-ppm/parameter/now-week-evolve/approval/{instanceId}';
          // 替换url中的变量
          url = url.replace('{instanceId}', String(pageParameter_state.processInstanceId))
          // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
          Object.keys(params).forEach(key=>{ if(params[key] === null){ delete params[key] }else if( Object.prototype.toString.call(params[key]) === '[object Object]' ){ Object.keys(params[key]).forEach(childKey=>{ if(params[key][childKey] === null || (Array.isArray(params[key][childKey]) && params[key][childKey].length === 1 && isNullOrUnDef(params[key][childKey]?.[0]))){ delete params[key][childKey] }}) } });
          return post(url, params, {
                headers: undefined
              }).then(async (resp) => {
            dataConnector_conn_5zvrzc2qr1_response.value = resp;

            return resp;
          }).catch(async (e) => {


            return Promise.reject(e);
          }).finally(async () => {


          })
        }

          return await exec()

    }


  /* ========================== 页面数据 ========================== */



  /* -------------------------- 响应 -------------------------- */

  /* ========================== 响应 ========================== */


  /* -------------------------- 函数 -------------------------- */

  /* ========================== 函数 ========================== */


  /* -------------------------- 页面参数 -------------------------- */

    const pageParameter_state = reactive({
        'processInstanceId': props.processInstanceId ?? route.query.processInstanceId,
    })

  /* ========================== 页面参数 ========================== */


  /* -------------------------- 组件事件处理方法 -------------------------- */

    // ---------------------------- 组件数据同步 ----------------------------
    // 处理 文本 的 rt_text 属性关联
  watch(() => dataConnector_conn_5zvrzc2qr1_response?.value?.data?.projectName,
    () => {
      let dataList = dataConnector_conn_5zvrzc2qr1_response?.value?.data?.projectName

      vid_buqb1x2cj3_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 文本 的 rt_text 属性关联
  watch(() => dataConnector_conn_5zvrzc2qr1_response?.value?.data?.modifiedTime,
    () => {
      let dataList = dataConnector_conn_5zvrzc2qr1_response?.value?.data?.modifiedTime

      vid_hburz7x4mw_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 文本 的 rt_text 属性关联
  watch(() => dataConnector_conn_5zvrzc2qr1_response?.value?.data?.plName,
    () => {
      let dataList = dataConnector_conn_5zvrzc2qr1_response?.value?.data?.plName

      vid_21wyecem44_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 文本 的 rt_text 属性关联
  watch(() => dataConnector_conn_5zvrzc2qr1_response?.value?.data?.pmName,
    () => {
      let dataList = dataConnector_conn_5zvrzc2qr1_response?.value?.data?.pmName

      vid_2m8qud82rb_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 文本 的 rt_text 属性关联
  watch(() => dataConnector_conn_5zvrzc2qr1_response?.value?.data?.monthGoal,
    () => {
      let dataList = dataConnector_conn_5zvrzc2qr1_response?.value?.data?.monthGoal

      vid_ikbn1te5r0_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 简单文本_tq9v708v0o 的 rt_text 属性关联
  watch(() => dataConnector_conn_5zvrzc2qr1_response?.value?.data?.description,
    () => {
      let dataList = dataConnector_conn_5zvrzc2qr1_response?.value?.data?.description

      vid_zb6381vnxv_props.rt_text = dataList;
    },
    {deep: true})
    // ============================ 组件数据同步 ============================

  /**
  * 处理元素 对话框 的 cancel 事件
  */
  let handle_vid_fhnht6xntw_cancel = throttle(async (...params) => {
  vid_fhnht6xntw_props.visible = false;
  // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
  try {
  await vid_1441w57u2x_ref.value?.resetFields();
  } catch (error) { console.log(error);}
  }, 500)
  /**
  * 处理元素 对话框 的 ok 事件
  */
  let handle_vid_fhnht6xntw_ok = throttle(async (...params) => {
  vid_fhnht6xntw_props.visible = false;
  // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
  try {
  await vid_1441w57u2x_ref.value?.resetFields();
  } catch (error) { console.log(error);}
  }, 500)
  /* ========================== 组件事件处理方法 ========================== */


  /* -------------------------- 生命周期 -------------------------- */
  // 用于参数变更后重新执行自定义指令
      const queryUpdateFlag = ref(0);
      onMounted(() => { ;dataConnector_conn_5zvrzc2qr1()

    });

    onUnmounted(() => {
      // 销毁定时器
      setTimeOutList.forEach(({ repeat, timer }) => {
        repeat ?  clearInterval(timer): clearTimeout(timer);
      });
    });

  /* ========================== 生命周期 ========================== */


  /* -------------------------- 数据关联处理 -------------------------- */





  /* -------------------------- 表单数据同步 -------------------------- */
  /* ========================== 表单数据同步 ========================== */

  /* ========================== 数据关联处理 ========================== */


  /* -------------------------- 不同组件自定义的处理逻辑 -------------------------- */

  /* ========================== 不同组件自定义的处理逻辑 ========================== */


  // ================================定制化逻辑========================================
</script>
<style lang="less" scoped>
  .page_root {
  width: 100%;
  height: 100%;
  overflow: auto;
  }
  .page_root :deep(.@{ant-prefix}-spin-nested-loading),
  .page_root :deep(.@{ant-prefix}-spin-container)
   {
      height: 100%;
  }
  .page_root :deep(.@{ant-prefix}-spin-container .@{ant-prefix}-table-wrapper)
   {
      display: flex;
      flex-flow: column nowrap;
      justify-content: flex-start;
  }
  .page_root :deep(.@{ant-prefix}-table)
   {
    flex: auto;
    overflow: auto;
  }
  .table-moreBtn_down {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100px;
  }

  .table-moreBtn_menu :deep(.table-moreBtn_menu-item):hover {
    background: #ebf1ff;
  }

  /*  表格树结构样式处理，展开按钮层级增加*/
  :deep(.@{ant-prefix}-table-row-expand-icon) {
    z-index: 1;
  }
  /*  表格树结构 由于每个表格项采用自定义组件，使用绝对定位布局，开启树结构导致显示异常，暂时使用层级定位位置 */
  :deep(.@{ant-prefix}-table-row-level-1 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 15px !important;
    width: calc(100% - 15px);
  }
  :deep(.@{ant-prefix}-table-row-level-2 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 30px !important;
    width: calc(100% - 30px);
  }
  :deep(.@{ant-prefix}-table-row-level-3 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 45px !important;
    width: calc(100% - 45px);
  }
  :deep(.@{ant-prefix}-table-row-level-4 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 60px !important;
    width: calc(100% - 60px);
  }

  /* 穿梭框改变默认样式，为根据组件样式控制左右栏宽度。 */
  :deep(.@{ant-prefix}-transfer-list)
   {
      height: 100%;
      width: 50%;
  }
  .vid_lhd3lidih6{
      height:120px;
      overflow-x:visible;
      overflow-y:visible
  }
  .vid_jkc48q5g9z{
      height:750px;
      display:block;
      background-color:#FFFFFF;
      box-shadow:0px 0px 0px 0px
  }
  .vid_0ek8pq8tky{
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      margin-bottom:16px
  }
  .vid_ph9ukhlvw3{
      height:16px;
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      padding-left:8px;
      font-weight:600;
      color:rgba(38, 38, 38, 1);
      font-size:16px;
      line-height:16px;
      border-left-style:solid;
      border-left-width:4px;
      border-left-color:#3875FF
  }
  .vid_78u6bs9jm9{
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      margin-bottom:8px;
      box-shadow:0px 0px 0px 0px
  }
  .vid_nf78sccmv5{
      min-width:70px;
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_buqb1x2cj3{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_k9th1ntc8p{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_hburz7x4mw{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_iebzu52ilc{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_21wyecem44{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_lhcwd210yb{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_2m8qud82rb{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_i5vxvtjxug{
      display:flex;
      flex-direction:row;
      align-items:flex-start;
      flex-wrap:undefined;
      margin-bottom:8px;
      box-shadow:0px 0px 0px 0px
  }
  .vid_k5c28f38xn{
      min-width:84px;
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_8uq0n48ysf{
      width:100%;
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      box-shadow:0px 0px 0px 0px
  }
  .vid_ikbn1te5r0{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_exmd1m8sce{
      display:flex;
      flex-direction:row;
      align-items:flex-start;
      flex-wrap:undefined;
      box-shadow:0px 0px 0px 0px
  }
  .vid_ayavr70bfj{
      min-width:98px;
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_fn0v81kcuk{
      width:100%;
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      box-shadow:0px 0px 0px 0px
  }
  .vid_zb6381vnxv{
      font-weight:600;
      color:rgba(38, 38, 38, 1);
      box-shadow:0px 0px 0px 0px
  }
</style>